/**
 * @file      ac_tlm_router.cpp
 * @author    Rafael Ghussn Cano
 * 
 * @brief     Implements a ac_tlm counter.
 */

//////////////////////////////////////////////////////////////////////////////
// Standard includes
// SystemC includes
// ArchC includes

#include "ac_tlm_counter.h"

//////////////////////////////////////////////////////////////////////////////

/// Namespace to isolate memory from ArchC
using user::ac_tlm_counter;

/// Constructor
ac_tlm_counter::ac_tlm_counter( sc_module_name module_name ) :
  sc_module( module_name ),
  target_export("contador_port")
{
    /// Binds target_export to the memory
    target_export( *this );
    c = 0;
}


ac_tlm_rsp_status ac_tlm_counter::readm( uint32_t &d )
{
  d = c++;
  return SUCCESS;
}



